package com.devops.admin.service;

import com.devops.admin.po.DOSPod;
import com.devops.admin.po.DOSPodInfoPo;
import com.devops.admin.vo.DOSNamespaceChart;
import com.devops.admin.vo.MonitorPodStatusVo;
import io.fabric8.kubernetes.api.model.PodList;
import org.reactivestreams.Publisher;

import java.util.List;

/**
 * @ClassName DOSK8sPodService
 * @Description TODO
 * @Author hepingguo
 * @Date 2022/5/20 08:47
 * @Version 1.0
 **/
public interface DOSK8sPodService {
    PodList dealPodList(DOSNamespaceChart namespaceChart);

    /**
     * @Author heyabo
     * @Description 获取pod
     * @Date 16:30 2022/4/27
     * @Param []
     * @return java.util.List<com.example.logswebsocket.entity.DOSPod>
     **/
    List<DOSPod> getK8sClusterPod(DOSNamespaceChart namespaceChart);

    /**
     * @Author heyabo
     * @Description 获取pod详细信息
     * @Date 09:00 2022/5/20
     * @Param [releaseId, podName]
     * @return com.devops.admin.po.DOSPodInfoPo
     **/
    DOSPodInfoPo queryPodInfo(int releaseId,String podName,Integer type);

    /**
     * @Author heyabo
     * @Description 删除pod
     * @Date 17:01 2022/4/27
     * @Param [podName]
     * @return boolean
     **/
    boolean deleteK8sClusterPod(String podName,int releaseId,int type);

    /**
     * @Author heyabo
     * @Description 订阅pod的运行状态
     * @Date 14:28 2022/12/2
     * @Param [podStatusVo]
     * @return org.reactivestreams.Publisher<java.lang.String>
     **/
    Publisher<Integer> monitorPodStatus(MonitorPodStatusVo podStatusVo);
}
